1. Technical Field
The present invention relates to a microcontroller suitable for a multitask process for receiving data from an external device during an arithmetic operation of the CPU (central processing unit) using data from a memory device.
2. Prior Art
Multitasking is well known as a method of improving the computing speed of a computer. In a computer performing a multitask process, for example, a write operation of data from the external device to another location of the main memory takes place simultaneously with the arithmetic process of the CPU (central processing unit) using a part of the main memory.
The control of a multitask operation can be achieved either by software or hardware. In the control by software, however, the main memory region is taken up by a control program, so that hardware control is often adopted to meet the requirement of more effective use of the memory.
The techniques for executing multitasking by hardware have been revealed by literature as follows.
Literature (1) JP-A-5-274154, Program Load Method and Memory Back-up Method
Literature (2) JP-A-7-210449, Dual Port RAM Access Circuit
Literature (3) JP-A-3-105440, Shared Memory Access Method The literature (1) discloses a case where a dual port RAM for the main memory is divided in its application. Specifically, the serial memory portion of the RAM is dedicated to DMA (direct memory access) and the random access memory portion is dedicated to the CPU.
The literature (2) discloses a structure that while the CPU accesses the first memory region of the dual port RAM, the data processing circuit can access the second memory region.
The literature (3) discloses a structure that a free memory bank can be used as a memory region accessible by another processor.
Meanwhile, the prior-art techniques mentioned above have the following problem. In those methods that use the dual port RAM in a subdivided form as indicated in literatures (1) and (2), it is necessary to control a plurality of subdivisions of the dual port RAM, so that the peripheral circuits have to be in complicated configurations. Therefore, those methods are not suitable for forming a less expensive microcontroller in a less expensive configuration.
The method using memory banks as indicated in literature (3) lacks in operational facility because data must be input or output to and from the memory by using another processor.